package com.lcf.order.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lancf on 2019/7/9.
 */
@RestController
@RequestMapping("/env")
@RefreshScope
public class TestConfigClientController {

    @Value("${env}")
    private String env;

    @Value("${env2:3}")
    private String env2;

    @Value("${env3:4}")
    private String env3;

    @GetMapping("/print")
    public String print() {
        return "env=" + env + ", env2=" + env2 + ", env3=" + env3;
    }


}
